-- GENERATED SPELL FOR [Shadowmoon Adept] --


function spell0_17397(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(11978,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17397', 6318, 1)
end

function spell1_17397(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_17397', 588, 1)
end

function Sorts_17397(pUnit, Event)
local choix_sorts_17397 = math.random(0, 1)
if choix_sorts_17397 == 0 then
pUnit:RegisterEvent('spell0_17397', 1, 1)
end
if choix_sorts_17397 == 1 then
pUnit:RegisterEvent('spell1_17397', 1, 1)
end
end

function mob17397_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17397', math.random(1500, 3000), 1)
end

function mob17397_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17397_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17397_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17397, 1, 'mob17397_Action')
RegisterUnitEvent(17397, 2, 'mob17397_Leave')
RegisterUnitEvent(17397, 3, 'mob17397_Kill')
RegisterUnitEvent(17397, 4, 'mob17397_Die')
